//---------------------组件方法---------------------
export function JSONreflush(temp) {
  if (!emptyIsTrue(temp)) {
    return JSON.parse(JSON.stringify(temp));
  }
}
//判断是否为空，空为true
export function emptyIsTrue(entity) {
  return (
    entity == null ||
    JSON.stringify(entity) == '""' ||
    JSON.stringify(entity) == '"null"' ||
    JSON.stringify(entity) == "[]" ||
    JSON.stringify(entity) == "{}"
  );
}
//移除中括号[]和斜线/\和引号"
export function removeBracketsAndPipes(string) {
  return string.replace(/[\[\]\/\\\"|]/g, "");
}
